This project tries to shed light on the relationship between Life Expectancy, Electricity Consumption per capita (in kWh) and GDP growth per capita (in Y2000 $) for around 90 countries. The purpose is to understand whether human life expectancy in years is positively correlated with energy consumption and GDP growth. The question is whether more industrialized nations which have on average higher energy consumption and higher GDP per capita also have higher life expectancy.
This hypothesis appears obvious but having actual data to support it will be very helpful. Governments in developing and emerging countries like India, China and African nations can use such type of analysis for energy infrastructure planning and economic development. Better energy infrastructure leads to higher economic activity and more economic activity will create demand for more energy production and the cycle goes on leading to higher life expectancy. This positive correlation is explored in this project using various visualization techniques. Population of the various countries were also plotted. Different visualization techniques were used to represent this multivariate data to understand trends. War leads to reduction in life expectancy and this is quite stark in the case of Libya and Syria in the recent years.
The GDP, Electricity consumption, Life Expectancy and world population data were obtained from Gap Minder website https://www.gapminder.org/data/. Country continents and ISO codes were obtained from Wikipedia. There were a lot of missing data in the files which resulted in a lot of cleaning being performed. R has been used for all the cleaning and combining operations leading to one final data frame . Out of the 195 countries in the world only 84 countries had continuous GDP, Electricity Consumption, Life Expectancy and Population data from 1981 to 2011.
The first plot displayed is a boxplot of life expectancy from 1981 to 2018. Overall there is rise in life expectancy as shown in the below figure.
A simple one-way ANOVA was run to prove that the mean life expectancy for each year from 1981 to 2018 are different. Below are the results of the ANOVA and it clearly shows that there is enough evidence to reject the null hypothesis that the means are the same with a very small p-value (<2e-16)
## Analysis of Variance Table
##
## Response: Life_Exp
## Df Sum Sq Mean Sq F value Pr(>F)
## Year 37 41051 1109.50 13.712 < 2.2e-16 ***
## Residuals 6454 522208 80.91
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The life expectancy hasn’t increased uniformly across the world. Countries in Africa and war torn countries like Iraq, Libya and Syria which historically have had higher life expectancies, have seen it go down in the recent years. The choropleth plot on the Mercator world map shows this.
GDP and Electricity consumption are themselves correlated. This is shown in the animation plot below for various countries and by year. Please click on play to cycle through the entire dataset. It is hard to display multivariate data and using animation is one of the many ways to visualize it.
The following plots show similar sweeps from 1981 to 2011 with Life Expectancy on the y axis. Life expectancy is strongly correlated with GDP and Electricity consumption.
The correlation plot below, shows the Pearson correlation coefficient between Electricity Consumption, GDP, Life Expectancy and Population pairwise for all 84 countries for year 2011. As stated before Life Expectancy shows strong correlation with GDP and slightly weaker with Electricity consumption.
Correlation Plot - Year = 2011 by Country
This proves the hypothesis that greater economic activity aided by more power production and consumption leads to higher life expectancy in general. War leads to a reduction in Life Expectancy. For example in the case of Libya life expectancy reduced from 76 years in 2010 to 61 years in 2011